import request from '@/utils/request'

// 查询考试考生列表
export const examStudentList = (query) => {
    return request({
        url: '/system/exam/student/list',
        method: 'get',
        params: query
    })
}

// 查询班级信息列表
export const classlist = (query) => {
    return request({
        url: '/system/exam/school/class/list',
        method: 'get',
        params: query
    })
}

// 新增考试考生
export const examStudentAdd = (query) => {
    return request({
        url: '/system/exam/student',
        method: 'post',
        data: query
    })
}

// 修改考试考生
export const examStudentEdit = (query) => {
    return request({
        url: '/system/exam/student',
        method: 'put',
        data: query
    })
}

// 删除考试考生
export const examStudentDel = (query) => {
    return request({
        url: '/system/exam/student/' + query,
        method: 'delete',
    })
}

export const delFoExamStudent = (query) => {
    return request({
        url: '/system/exam/student/delFoExamStudent',
        method: 'post',
        data: query
    })
}

export function uploadImport(data,deptId,examId,examSchoolId,status){
    return request({
        url:`/system/exam/student/import?deptId=${deptId}&examId=${examId}&examSchoolId=${examSchoolId}&status=${status}`,
        method:'post',
        data:data,
        responseType: 'blob',
        headers: {
            'Content-Type': 'multipart/form-data' 
        }
    })
}

